<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" th:href="@{../favicon.ico}">

    <title>账号列表</title>

    <!-- Bootstrap core CSS -->
    <link th:href="@{../css/bootstrap.min.css}" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link th:href="@{../css/dashboard.css}" rel="stylesheet">
</head>
<body>
<div th:replace="~{common/commons.html::top}"></div>

<div class="container-fluid" th:fragment="sider">
    <div class="row">

        <div th:replace="~{common/commons.html::side(active = 'acc_list.html')}"></div>
        <main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">

            <div class="form-control">
                <form th:action="@{/searchAccount}" method="post">

                    <div class="input-group">
                        <input name="conditionText" type="text" class="form-control" placeholder="搜索要求">
                        <div class="input-group-append">
                            <select name="conditionType" id=""  class="selected">
                                <option value="不限">不限</option>
                                <option value="员工ID">员工ID</option>
                                <option value="用户名">用户名</option>
                                <option value="权限">权限</option>
                            </select>
                        </div>
                    </div>
                    <p></p>

                    <div style="float: right">
                        <button type="submit" id="button" class="btn btn-default">搜索</button>
                    </div>
                </form>
            </div>

            <h2>职位信息列表</h2>
            <div><a class="btn btn-sm btn-success" style="float: right" th:href="@{/addAccount}">添加账号</a></div>
            <div class="table-responsive">
                <table class="table table-striped table-sm">
                    <thead>
                    <tr>
                        <th>员工ID</th>
                        <th>用户名</th>
                        <th>密码</th>
                        <th>权限</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr th:each="acc:${accs}">
                        <td th:text="${acc.s_id}"></td>
                        <td th:text="${acc.username}"></td>
                        <td th:text="${acc.pwd}"></td>
                        <td th:text="${acc.authority}"></td>
                        <td>
                            <a class="btn btn-sm btn-primary" th:href="@{account/{id}(id=${acc.s_id})}">编辑</a>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>

        </main>

    </div>
</div>

<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script>window.jQuery || document.write('<script src="/js/jquery-slim.min.js"><\/script>')</script>
<script src="/js/popper.min.js"></script>
<script src="/js/bootstrap.min.js"></script>

<!-- Icons -->
<script src="https://unpkg.com/feather-icons/dist/feather.min.js"></script>
<script>
    feather.replace()
</script>
</body>
</html>